Skip to content

[Build] Define IU categories directly within each build repository #3216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

HannesWell
Copy link
Member

Define the IU categories for the eclipse artifacts directly in the category.xml.
This simplifies the management of those categories and adds them to each build repository. Due to the latter it's not necessary anymore to define the categories in a separated, colocated metadata repository, which is just hosting these categories (which is cumbersome to maintain), e.g. for the 4.36 release:
https://download.eclipse.org/eclipse/updates/4.36/categories/

This is required for (and with more context):

The current state of this PR is based on and replicates the

current `category/content.xml` file content
<?metadataRepository class='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1.0.0'?>
<repository name="The Eclipse Project Updates" type="org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository" version="1.0.0">
    <properties size="2">
        <property name="p2.compressed" value="true"/>
        <property name="p2.timestamp" value="1235426489722"/>
    </properties>
    <units size="7">
        <unit id="org.eclipse.equinox.target.categoryIU" version="0.0.0">
            <properties size="2">
                <property name="org.eclipse.equinox.p2.name" value="Equinox Target Components"/>
                <property name="org.eclipse.equinox.p2.description" value="Features especially useful to install as PDE runtime targets."/>
                <property name="org.eclipse.equinox.p2.type.category" value="true"/>
            </properties>
            <provides size="1">
                <provided namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.equinox.target.categoryIU" version="0.0.0"/>
            </provides>
            <requires size="1">
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.equinox.sdk.feature.group" range="0.0.0"/>
            </requires>
            <touchpoint id="null" version="0.0.0"/>
        </unit>
        <unit id="org.eclipse.sdk.ide.categoryIU" version="0.0.0">
            <properties size="2">
                <property name="org.eclipse.equinox.p2.name" value="Eclipse SDK"/>
                <property name="org.eclipse.equinox.p2.description" value="The full version of Eclipse, with source and documentation: Platform, JDT and PDE."/>
                <property name="org.eclipse.equinox.p2.type.category" value="true"/>
            </properties>
            <provides size="1">
                <provided namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.sdk.ide.categoryIU" version="0.0.0"/>
            </provides>
            <requires size="1">
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.sdk.ide" range="0.0.0"/>
            </requires>
            <touchpoint id="null" version="0.0.0"/>
        </unit>
        <unit id="org.eclipse.platform.ide.categoryIU" version="0.0.0">
            <properties size="2">
                <property name="org.eclipse.equinox.p2.name" value="Eclipse Platform"/>
                <property name="org.eclipse.equinox.p2.description" value="Minimum version of Eclipse: no source or API documentation, no PDE or JDT."/>
                <property name="org.eclipse.equinox.p2.type.category" value="true"/>
            </properties>
            <provides size="1">
                <provided namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.platform.ide.categoryIU" version="0.0.0"/>
            </provides>
            <requires size="1">
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.platform.ide" range="0.0.0"/>
            </requires>
            <touchpoint id="null" version="0.0.0"/>
        </unit>
        <unit id="org.eclipse.rcp.categoryIU" version="0.0.0">
            <properties size="2">
                <property name="org.eclipse.equinox.p2.name" value="Eclipse RCP Target Components"/>
                <property name="org.eclipse.equinox.p2.description" value="Features to use as PDE runtime target, while developing RCP applications."/>
                <property name="org.eclipse.equinox.p2.type.category" value="true"/>
            </properties>
            <provides size="1">
                <provided namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.rcp.categoryIU" version="0.0.0"/>
            </provides>
            <requires size="2">
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.rcp.feature.group" range="0.0.0"/>
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.rcp.source.feature.group" range="0.0.0"/>
            </requires>
            <touchpoint id="null" version="0.0.0"/>
        </unit>
        <unit id="org.eclipse.releng.testsIU" version="0.0.0">
            <properties size="2">
                <property name="org.eclipse.equinox.p2.name" value="Eclipse Tests, Tools, Examples, and Extras"/>
                <property name="org.eclipse.equinox.p2.description" value="Collection of Misc. Features, such as unit tests, SWT and e4 tools, examples, and compatibility features not shipped as part of main SDK, but which some people may desire in creating products based on previous versions of Eclipse."/>
                <property name="org.eclipse.equinox.p2.type.category" value="true"/>
            </properties>
            <provides size="1">
                <provided namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.releng.testsIU" version="0.0.0"/>
            </provides>
            <requires size="6">
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.test.feature.group" range="0.0.0"/>
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.sdk.tests.feature.group" range="0.0.0"/>
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.sdk.examples.source.feature.group" range="0.0.0"/>
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.osgi.compatibility.plugins.feature.feature.group" range="0.0.0"/>
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.swt.tools.feature.feature.group" range="0.0.0"/>
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.e4.core.tools.feature.source.feature.group" range="0.0.0"/>
            </requires>
            <touchpoint id="null" version="0.0.0"/>
        </unit>
        <unit id="org.eclipse.releng.java.languages.categoryIU" version="0.0.0">
            <properties size="3">
                <property name="org.eclipse.equinox.p2.name" value="Eclipse Java Development Tools"/>
                <property name="org.eclipse.equinox.p2.description" value="Tools to allow development with Java."/>
                <property name="org.eclipse.equinox.p2.type.category" value="true"/>
            </properties>
            <provides size="1">
                <provided namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.releng.java.languages.categoryIU" version="0.0.0"/>
            </provides>
            <requires size="2">
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.jdt.feature.group" range="0.0.0"/>
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.jdt.source.feature.group" range="0.0.0"/>
            </requires>
            <touchpoint id="null" version="0.0.0"/>
        </unit>
        <unit id="org.eclipse.releng.pde.categoryIU" version="0.0.0">
            <properties size="3">
                <property name="org.eclipse.equinox.p2.name" value="Eclipse Plugin Development Tools"/>
                <property name="org.eclipse.equinox.p2.description" value="Tools to develop bundles, plugins and features."/>
                <property name="org.eclipse.equinox.p2.type.category" value="true"/>
            </properties>
            <provides size="1">
                <provided namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.releng.pde.categoryIU" version="0.0.0"/>
            </provides>
            <requires size="2">
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.pde.feature.group" range="0.0.0"/>
                <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.pde.source.feature.group" range="0.0.0"/>
            </requires>
            <touchpoint id="null" version="0.0.0"/>
        </unit>
    </units>
</repository>

with the difference that declared source features, are replaced by the main feature and that the non existing org.eclipse.osgi.compatibility.plugins.feature.feature.group (for which I didn't found a replacement) is omitted.
The inclusion of products is currently work in progress.

And as many artifacts are uncategorized, we could think about moving them into existing or new categories and generally think if we want to rename or restructure the existing categories (but this can also be done in a follow-up):

@HannesWell HannesWell force-pushed the inline-category-definition branch from 0c7aceb to 351b5f8 Compare August 11, 2025 16:50
@HannesWell
Copy link
Member Author

This works quite well, all artifacts and units, including the products' units are included in the repo.
The only disadvantage of this approach that I can see is that now all categories are made unique by P2 by prepending the current qualifier to the ID and by appending a hash based on the content to the version.

This prevents actually identical categories from being merged, in case multiple repositories are present. But as most P2-repos contain a category only once (I'm only aware of I/Y-build repos containing multiple children) and the P2 UI by default shows the latest version only anyways, I consider this only a minor issue.
But as this is important for subsequent RelEng enhancements, I'll leave avoiding that minor issue for later, in case it's really bothering.

@HannesWell HannesWell marked this pull request as ready for review August 17, 2025 21:54
@HannesWell HannesWell merged commit f46de04 into eclipse-platform:master Aug 17, 2025
6 checks passed
@HannesWell HannesWell deleted the inline-category-definition branch August 17, 2025 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant